
<template>
<div id="app">
<h1 @mouseenter='flag1=true' @mouseleave='flag1=false'><span v-html="sb"></span><span class="i">{{pin}}</span><i v-show="flag1" @click="edit">编辑</i></h1>
  <div class="da" v-show="flag">
<span>标题：</span><input type="text" v-model="biao"><br>
<span>频道：</span><input type="text" v-model="pin"><br>
<button class="qu"><i class="cl">取消</i></button>
<button class="que" @click="add"><i class="cl">确定</i></button>
</div>
</div>
</template>
<script>
  export default {
    data () {
      return {
        biao:'',
        pin:'',
        flag:true,
        sb:'',
        flag1:false
      }
    },
    methods:{
      add(){
        this.sb = this.biao
        this.flag = false
      },
      edit(){
        this.flag = true
      }
    }
  }
</script>
<style  scoped>

  #app {
    margin: 100px auto;
    text-align: center;
  }
  span {
    font-size: 20px;
    font-weight: 700;
  }
  input {
    margin: 20px auto;
    width: 200px;
    height: 30px;
  }
  
  p {
    width: 30px;
    height: 20px;
    background-color: #27b99a;
  }
  button {
    text-align: center;
    /* padding-left: 50px; */
    margin: 0 10px;
    width: 50px;
    height: 30px;
  }
  .qu {
    background-color: #cccccc;
  }
  .que {
    background-color: blue;
  }
  i {
    font-size: 15px;
    
    /* display: none; */
  }
  .cl {
    /* background-color: red; */
    text-align: center;
    color: #fff;
  }
  .i {
    color: #fff;
    background-color: #25b99a;
    font-size: 18px;
  }
</style>
